`:top
The `!frame buffer object`! architecture (FBO) is an extension to `F33f`_`[OpenGL`:/page/wikibook/entry.mu`zim=wikipedia_en_all_nopic_2025-08.zim|entry_path=OpenGL]`_`f for doing flexible off-screen rendering, including rendering to a `F33f`_`[texture`:/page/wikibook/entry.mu`zim=wikipedia_en_all_nopic_2025-08.zim|entry_path=Texture_(computer_graphics)]`_`f. By capturing images that would normally be drawn to the screen, it can be used to implement a large variety of image filters, and post-processing effects. The FBO is analogous to the `!render targets model`! in `F33f`_`[DirectX`:/page/wikibook/entry.mu`zim=wikipedia_en_all_nopic_2025-08.zim|entry_path=DirectX]`_`f. It is used in OpenGL for its efficiency and ease of use. The use of FBOs doesn't suffer from the overhead associated with OpenGL drawing context switching, and has largely superseded the `F33f`_`[pbuffer`:/page/wikibook/entry.mu`zim=wikipedia_en_all_nopic_2025-08.zim|entry_path=Pbuffer]`_`f and other methods involving context switches.
>>Contents
• `F0af`_`[Uses`#uses]`_`f
• `F0af`_`[Advantages over other methods`#advantages-over-other-methods]`_`f
• `F0af`_`[Architecture`#architecture]`_`f
• `F0af`_`[External links`#external-links]`_`f
-─
>>Uses
The FBO has two main uses: The post-processing of rendered images and composition between different scenes. Some examples are:
1. The rendered image is captured and subjected to `F33f`_`[Fragment Shaders`:/page/wikibook/entry.mu`zim=wikipedia_en_all_nopic_2025-08.zim|entry_path=Fragment_Shaders]`_`f or other manipulations. This allows for many of today's popular computer graphics effects to be carried out, including the addition of a blurring or bloom effect.
2. Can be used to create views of other scenes, for example: a TV in a house showing the view from a secondary camera. A scene can be rendered through an FBO to a texture, then that texture can be applied to the surface of a TV. This is sometimes called "Render to Texture" or RTT.
>>Advantages over other methods
Methods involving the FBO are considered superior because:
• It is easier to set up than most other methods.
• Does not require context switching.
• Is more efficient because resources are shared within the same context.
• Is more flexible because all of `F33f`_`[depth buffer`:/page/wikibook/entry.mu`zim=wikipedia_en_all_nopic_2025-08.zim|entry_path=Depth_buffer]`_`f, `F33f`_`[stencil buffer`:/page/wikibook/entry.mu`zim=wikipedia_en_all_nopic_2025-08.zim|entry_path=Stencil_buffer]`_`f, etc. can be acquired.
>>Architecture
To use an FBO one simply creates an instance of it. Along with the FBO come several attachments. One can then attach these to a chosen receiver: either a `F33f`_`[texture`:/page/wikibook/entry.mu`zim=wikipedia_en_all_nopic_2025-08.zim|entry_path=Texture_(computer_graphics)]`_`f, or a render buffer.
For example:
• Create an FBO and bind it.
• Attach the color buffer (either as a RenderBuffer or a texture) to the FBO.
• Attach the depth buffer (either as a RenderBuffer or a texture) to the FBO.
• Bind the native window FrameBuffer (id=0)
• Render the texture to screen with a pixel shader, dependent on both the Color information and depth information.
>>External links
• Framebuffer object technical paper Archived 2013-05-02 at the `F33f`_`[Wayback Machine`:/page/wikibook/entry.mu`zim=wikipedia_en_all_nopic_2025-08.zim|entry_path=Wayback_Machine]`_`f
• Framebuffer object reference at openvidia
• Example code for Windows and Linux
• EXT Framebuffer (opengl.org)
`c`F0af`_`[↑ Back to top`#top]`_`f`a